package com.itheima.array;

import java.util.ArrayList;

public class 课后练习2 {
    public static void main(String[] args) {


        ArrayList<teacheer> list = new ArrayList<>();
        teacheer a1 = new teacheer("赵老师", "javase");
        teacheer a2 = new teacheer("钱老师", "javaee");
        teacheer a3 = new teacheer("孙老师", "php");
        teacheer a4 = new teacheer("李老师", "python");
        list.add(a1);
        list.add(a2);
        list.add(a3);
        list.add(a4);
        for (int i = 0; i < list.size(); i++) {
            teacheer a = list.get(i);
            System.out.println(a.getName() + "专业为" + a.get专业());
        }

    }
}